FROM debian:latest
RUN apt update
RUN apt install apt-transport-https ca-certificates -y
COPY source.txt /etc/apt/sources.list
RUN apt update
RUN apt install git -y
RUN git clone https://gitee.com/fcsq-security-team2/st-forum
WORKDIR /st-forum
RUN git checkout dev
WORKDIR /
RUN apt install wget -y
RUN wget https://studygolang.com/dl/golang/go1.18.3.linux-amd64.tar.gz
RUN tar -xf go1.18.3.linux-amd64.tar.gz
RUN wget https://npmmirror.com/mirrors/node/v16.15.1/node-v16.15.1-linux-x64.tar.xz
RUN apt install xz-utils -y
RUN tar -xf node-v16.15.1-linux-x64.tar.xz
COPY bashrc.txt /root/.bashrc
# RUN source /root/.bashrc
ENV PATH "/node-v16.15.1-linux-x64/bin:/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
RUN go env -w GOPROXY=https://goproxy.cn,direct
WORKDIR /st-forum
RUn apt install g++ -y
RUN ./build.sh
ENTRYPOINT ["/st-forum/stforum"]